package com.jiangyao.model.dto.backend;

import com.jiangyao.model.dto.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 课件DTO
 *
 * @author: yangyongchuan
 * @create: 2020年08月20日 01:27
 */
@ApiModel("课件DTO")
@Data
public class CoursewareDTO implements BaseDTO {
	private static final long serialVersionUID = 461658459967523179L;

	/**
	 * 课件ID
	 */
	@ApiModelProperty("课件ID")
	@NotNull(message = "课件ID不能为空", groups = {Edit.class, Detail.class})
	private Integer coursewareId;

	/**
	 * 课件ID集合
	 */
	@ApiModelProperty("课件ID集合")
	private List<Integer> coursewareIdList;

	/**
	 * 课件分类
	 */
	@ApiModelProperty("课件分类")
	@NotNull(message = "课件分类不能为空", groups = {Edit.class})
	private Integer categoryId;

	/**
	 * 课件名称
	 */
	@ApiModelProperty("课件名称")
	@NotNull(message = "课件名称不能为空", groups = {Add.class, Edit.class})
	@NotEmpty(message = "课件名称不能为空", groups = {Add.class, Edit.class})
	private String coursewareName;

	/**
	 * 文件名称
	 */
	@ApiModelProperty("文件名称")
	@NotNull(message = "文件名称不能为空", groups = {Add.class, Edit.class})
	@NotEmpty(message = "文件名称不能为空", groups = {Add.class, Edit.class})
	private String fileName;

	/**
	 * 课件简介
	 */
	@ApiModelProperty("课件简介")
	private String coursewareDesc;

	/**
	 * 资源类型 1-视频 4-在线视频
	 */
	@ApiModelProperty(value = "资源类型 1-视频 4-在线视频 ", example = "1")
	@NotNull(message = "资源类型不能为空", groups = {Add.class})
	private Integer resourcesType;

	/**
	 * 资源存储地址
	 */
	@ApiModelProperty("资源存储地址")
	@NotNull(message = "视频不能为空", groups = {Add.class, Edit.class})
	@NotEmpty(message = "视频不能为空", groups = {Add.class, Edit.class})
	private String resourcesPath;

	/**
	 * 课件总时长,秒
	 */
	@ApiModelProperty(value = "课件总时长,秒", example = "0")
	private Integer totalTime;

	/**
	 * 状态 1启用 0 关闭
	 */
	@ApiModelProperty("状态 1启用 0 关闭")
	private Integer status;

}
